<!--
 * @Description: file content
 * @Author: Wenmin He
 * @Date: 2021-07-02 16:33:15
 * @LastEditors: luojie
 * @LastEditTime: 2021-08-13 19:07:02
-->
<template>
  <view class="content">
    <!-- <view>
      <swiper
        :indicator-dots="false"
        :autoplay="true"
        :interval="3000"
        :duration="500"
        indicator-active-color="#fa4848"
        class="swiper-outer"
      >
        <swiper-item
          v-for="(item, index) in imgSrcArr"
          :key="index"
          class="swiper-box"
        >
          <view class="banner-img">
            <image
              class="swiper-images"
              :src="item.src"
              mode="widthFix"
            ></image>
          </view>
        </swiper-item>
      </swiper>
    </view> -->

    <view class="basic" v-if="fromAbroad == '1'">
      <view class="basic-title">
        <view class="flex-left">基本信息</view>
      </view>
      <view class="form-item">
        <view class="label">姓名</view>
        <view class="detail">{{formData.name || ''}}</view>
      </view>

      <view class="form-item">
        <view class="label">电话</view>
        <view class="detail">{{formData.telPhone || ''}}</view>
      </view>
      
      <view class="form-item-card">
        <view class="form-item-card-row">
          <view class="label">是否有内地居民身份证</view>
          <view class="detail">
            <uni-data-checkbox 
              class="my-raido"
              v-model="formData.checkBoxValue" 
              :localdata="range" 
              @change="onCheckRadioChange()"
            ></uni-data-checkbox>
          </view>
          <view class="tips">持内地身份证人员请选择"有"</view>
        </view>
      </view>

      <view class="form-item-card"  v-if="formData.checkBoxValue == '1'">
        <view class="form-item-card-row">
          <view class="label" style="width:100%;">内地居民身份证号码</view>
          <view class="item-cid">
            <uni-easyinput
              type="text"
              class="card-num"
              placeholderStyle="font-size:26rpx;font-family: PingFang SC;color: #666666;"
              v-model="formData.cid"
              placeholder="请输入身份证号"
            ></uni-easyinput>
            <view class="warming" :class="{'border-top': warming}"><text v-if="warming">请输入正确的身份证号码</text></view>
          </view>
        </view>
      </view>
    </view>

    <!-- 自主填报入口 -->
    <view v-if="isChild" class="child-report">
      <image
        src="https://szgd-dev.tgovcloud.com/public/images/child.png"
        class="child-report-img"
        mode="widthFix"
      ></image>
      <view class="child-report-text">未满14周岁不适用心理评估~</view>
    </view>
    <!-- <view v-else-if="reportType.isolateUser"> -->
    <view v-else class="mar-t">
      <view>
        <!-- <view class="self-report">
          <view class="self-report-icon"></view>-->
        <!-- :class="isReport ? 'self-report-icon-success' : 'self-report-icon'" -->
        <!-- {{ isReport ? "您已完成心理评估" : "请完成心理评估自主申报" }} -->
        <!-- </view>-->
        <view class="nav-list">
          <view class="flex-box">
            <view class="start-btn start-btn-left" @click="tbjlBtn('jk')"
              >提交记录</view
            >
            <view class="start-btn start-btn-right" @click="healthSubmitBtn"
              >提交</view
            >
          </view>
          <view
            v-for="item in healthList"
            :key="item.type"
            class="nav-list-item self-report-list-item"
            @click="startBtn(item.type)"
          >
            <view class="nav-list-item-img">
              <image
                class="nav-list-item-img-show"
                :src="item.icon"
                mode="widthFix"
              ></image>
            </view>
            <view class="nav-list-item-title">{{ item.title }}</view>
            <view class="nav-list-item-success" v-if="item.isComplete"
              >已填写</view
            >
            <view
              class="nav-list-item-success uncomplate"
              v-if="!item.isComplete"
              >未填写</view
            >
          </view>
          <view class="flex-box left-sty">
            <view class="flex-left">健康填报</view>
            <view class="flex-right">预填报的信息需要医护人员确认</view>
          </view>
        </view>
        <!-- <view class="start-btn" v-if="isReport" @click="startBtn">开始</view> -->

        <view></view>
      </view>
      <view>
        <!-- <view class="self-report">
          <view class="self-report-icon"></view>-->
        <!-- :class="isReport ? 'self-report-icon-success' : 'self-report-icon'" -->
        <!-- {{ isReport ? "您已完成心理评估" : "请完成心理评估自主申报" }} -->
        <!--请完成心理评估自主申报
        </view>-->
        <view class="nav-list">
          <view class="flex-box">
            <view class="start-btn start-btn-left" @click="tbjlBtn('xl')"
              >提交记录</view
            >
            <view class="start-btn start-btn-right" @click="submitBtn"
              >提交</view
            >
          </view>
          <view
            v-for="(item, index) in reportList"
            :key="item.type"
            class="nav-list-item self-report-list-item"
            @click="startBtn(item.type)"
          >
            <view class="nav-list-item-img">
              <image
                class="nav-list-item-img-show"
                :src="item.icon"
                mode="widthFix"
              ></image>
            </view>
            <view class="nav-list-item-title">{{ item.title }}</view>
            <view class="nav-list-item-success" v-if="item.isComplete"
              >已填写</view
            >
            <view
              class="nav-list-item-success uncomplate"
              v-if="!item.isComplete"
              >未填写</view
            >
          </view>
          <view class="flex-box left-sty">
            <view class="flex-left">心理评估</view>
            <view class="flex-right"></view>
          </view>
        </view>
        <!-- <view class="start-btn" v-if="isReport" @click="startBtn">开始</view> -->
        <view></view>
      </view>
    </view>
  </view>
</template>

<script>
import { mentalHealth, getData,setPersonHealth } from "@/api";

var phone;
export default {
  data() {
    return {
      isReport: 0,
      isChild: 0,
      hasDataGad7: "",
      hasDataPhq9: "",
      hasDataIsi: "",
      reportType: {
        isolateUser: 0,
        systemUser: 1,
      },
      imgSrcArr: [
        {
          src: "https://szgd-dev.tgovcloud.com/public/images/banner.png",
          url: "https://element.eleme.cn/#/zh-CN/component/installation",
        },
      ],
      //健康填报
      healthList: [
        {
          icon: "https://szgd-dev.tgovcloud.com/public/images/referral/icon-health.png",
          title: "健康登记",
          type: "health",
          isComplete: uni.getStorageSync("health"),
          isFill: false,
        },
      ],
      //自主填报菜单
      reportList: [
        {
          icon: "https://szgd-dev.tgovcloud.com/public/images/anxious.png",
          title: "焦虑问卷",
          type: "dataGad7",
          isComplete: uni.getStorageSync("dataGad7"),
          isFill: false,
        },
        {
          icon: "https://szgd-dev.tgovcloud.com/public/images/psychology.png",
          isFill: false,
          title: "心理健康问卷",
          type: "dataPhq9",
          isComplete: uni.getStorageSync("dataPhq9"),
        },
        {
          icon: "https://szgd-dev.tgovcloud.com/public/images/insomnia.png",
          isFill: false,
          title: "失眠严重指数",
          type: "dataIsi",
          isComplete: uni.getStorageSync("dataIsi"),
        },
      ],
      dataIsiArr: [],
      dataPhq9Arr: [],
      dataGad7Arr: [],
      scoreGad7: "",
      scoreIsi: "",
      scorePhq9: "",
      resultGad7: "",
      resultIsi: "",
      resultPhq9: "",
      range: [
        {
          value: "0",
          text: "无",
        },
        {
          value: "1",
          text: "有",
        },
      ],
      formData:{
        checkBoxValue: "1",
      },
      fromAbroad: '0',
      warming: false,
    };
  },
  onUnload() {
    this.$store.commit("SET_AUTH_STATUS", false);
  },
  methods: {
    setFormAata(){
      // 存用户基本信息
      uni.setStorage({
        key: "dataFromUserBaseInfo",
        data: this.formData,
      });
    },
    tbjlBtn(e) {
      // 存用户基本信息
      this.setFormAata();
      uni.navigateTo({
        url: `/packageIsolate/pages/tbjl/list?type=${e}`,
      });
    },
    getRepRes() {
      try {
        let dataGad7 = uni.getStorageSync("dataGad7"); // 焦虑问卷：dataGad7
        let dataPhq9 = uni.getStorageSync("dataPhq9"); // 心理健康问卷：dataPhq9
        let dataIsi = uni.getStorageSync("dataIsi"); // 失眠严重指数：dataIsi
        // console.log('====', dataIsi, dataPhq9,  dataGad7)

        if (dataGad7) {
          this.reportList[0].isFill = true;
          this.dataGad7Arr = dataGad7;
        }
        if (dataPhq9) {
          this.reportList[1].isFill = true;
          this.dataPhq9Arr = dataPhq9;
        }
        if (dataIsi) {
          this.reportList[2].isFill = true;
          this.dataIsiArr = dataIsi;
        }
      } catch (error) {
        console.log(error);
      }
    },

    onCheckRadioChange(e){
      const value = e.detail.value;
      this.formData.checkBoxValue = value;
      // if (value == "0") {
      //   this.formData.cyfs = "";
      //   this.formHandle.cyfsIndex = "";
      // }
    },

    //开始答题
    startBtn(type) {
      console.log('startBtn(type)===', type)

      // 存用户基本信息
      this.setFormAata();

      if(type === 'health') {
        uni.navigateTo({
          url:`/packageIsolate/pages/healthRegistration/questionnaire`
        })
      } else {
        uni.navigateTo({
          url: `/packageIsolate/pages/mentalHealth/questionnaire?type=${type}`,
        });
      }
    },

    //查询隔离人员信息
    getPersonInfo(telPhone) {
      getData("getPersonInfo", "get", { phone: telPhone })
        .then((data) => {
          uni.setStorage({
            key: "personInfo",
            data: data.length > 0 ? data[0] : {},
          });
          if (this.fromAbroad == '1') {
            this.getReport();
          }
        })
        .catch((e) => {
          console.log(e, 8888);
        });
    },
    //查询是否已经完成自主填报
    getReport() {
      let personInfo = uni.getStorageSync("personInfo");
      if (personInfo.age < 14 && personInfo.age != null) this.isChild = 1;
      // getData("comprehensive", "get", { personId: personInfo.personId })
      // getData("publicCid", "get", { daSourceId: "CHN-C51473267" })
      getData("publicCid", "get", { daSourceId: this.formData.daSourceId })
        .then((res) => {
          console.log(res);
          if (res && res.cid) {
            this.formData.cid = res.cid;
          }
        })
        .catch((e) => {
          console.log(e, 8888);
        });
    },

    getNowTime: function() {
      let dateTime;
      let yy = new Date().getFullYear();
      let mm = new Date().getMonth() + 1;
      let dd = new Date().getDate();
      let hh = new Date().getHours();
      mm = mm < 10 ? "0" + mm : mm;
      dd = dd < 10 ? "0" + dd : dd;
      hh = hh < 10 ? "0" + hh : hh;
      let mf =
        new Date().getMinutes() < 10
          ? "0" + new Date().getMinutes()
          : new Date().getMinutes();
      let ss =
        new Date().getSeconds() < 10
          ? "0" + new Date().getSeconds()
          : new Date().getSeconds();
      dateTime = yy + "-" + mm + "-" + dd + " " + hh + ":" + mf + ":" + ss;
      console.log(dateTime);
      return dateTime;
    },
    healthSubmitBtn(){
      let health = uni.getStorageSync('health') || [];
      if(!health.length){
        uni.showToast({
          title: `请填写后再提交`,
          duration: 3000,
          icon: "none",
        });
        return;
      }

      //身份证表单验证（入境人员）
      if(this.fromAbroad == '1' && this.formData.checkBoxValue == '1'){
        let jmsfz = /(^\d{8}(0\d|10|11|12)([0-2]\d|30|31)\d{3}$)|(^\d{6}(18|19|20)\d{2}(0\d|10|11|12)([0-2]\d|30|31)\d{3}(\d|X|x)$)/;
        // if (!res.cardId) {
        if (!jmsfz.test(this.formData.cid)) {
          // uni.showToast({
          //   icon: "none",
          //   title: "身份证号码格式不正确",
          // });
          this.warming = true;
          return
        }else{
          this.warming = false;
        }
      }

      let newData = {};
      health.forEach((res) => {
        res.fieId && (newData[res.fieId] = res.value);
        res.inputFieId && (newData[res.inputFieId] = res.inputValue);
        // 疫苗
        if (res.value ==1 && (res.fieId == "ymzsdyzsf" || res.fieId == "ymzsdezsf" || res.fieId == "ymzsdszsf")) {
          newData[res.fieId] = res.value!=null && res.value!=undefined ? res.value : 0;
          res.array.map((obj) => {
            if(obj.type=='time'){
              newData[obj.fieId] = obj.value + " 00:00:00";
            }else{
              newData[obj.fieId] = obj.value;
            }
          });
        }
        // 筛选排查
        if (res.value ==1 && res.fieId == "screenRegis") {
          res.array.forEach((item) => {
            newData[item.fieId] = item.value;
          });
        }
        // 急症病史
        if (res.value ==1 && res.fieId == "jzbs") {
          newData[res.inputFieId] = res.inputValue;
          newData[res.fieId] = res.value == 1 ? res.checkBoxValue.join(",") : "0";
        }

        // 流行病学史
        if (res.value ==1 && res.fieId == "ywlxbxs") {
          newData[res.inputFieId] = res.inputValue;
          delete newData.ywlxbxs;
        }

        // 慢性呼吸系统疾病
        if (res.value ==1 && res.fieId == "isChronic") {
          if (res.checkBoxValue.length > 0) {
            res.array.forEach((obj, idx) => {
              newData[obj.fieId] = res.checkBoxValue.indexOf(obj.value) > -1 ? 1 : 0
              newData[res.inputFieId] = res.inputValue;
            });
          }
        }
        res.timeValue && (newData[res.timeFieId] = res.timeValue);
      });

      // let { telPhone,name,cardType,cardId,cid} = uni.getStorageSync("dataFromUserBaseInfo");
      let { telPhone,name,cardType,cardId,cid,daSourceId} = this.formData;
      newData.isPregnant == undefined?newData.isPregnant=0:''
      newData.telPhone = telPhone
      newData.name = name;
      newData.cardType = cardType;
      newData.cardId = cardId;
      newData.cid = cid;
      // newData.cid = "4509211999201206033321";
      // newData.daSourceId = "CHN-C51473267";
       newData.daSourceId = daSourceId;

      uni.showLoading({
        title: '加载中',
        mask:true
      });
      // console.log('健康登记提交参数：',newData);
     
      setPersonHealth(newData).then(res=>{
        uni.hideLoading();
        // debugger
        console.log('提交健康登记=====')
        // 提交健康登记不清除缓存
        try {
          uni.removeStorage({
            key: "health",
          });
          this.healthList[0].isComplete = null;
        } catch (error) {}

        // 存用户基本信息
        this.setFormAata();

        uni.navigateTo({
          url: '../healthRegistration/success',
        });
      })
    },
    submitBtn() {
      const problemList = [].concat(
        this.dataIsiArr,
        this.dataPhq9Arr,
        this.dataGad7Arr
      );
      console.log("problemList", problemList);
      if (!problemList.length) {
        uni.showToast({
          title: `请填写后再提交`,
          duration: 3000,
          icon: "none",
        });
        return;
      }

      //身份证表单验证（入境人员）
      if(this.fromAbroad == '1' && this.formData.checkBoxValue == '1'){
        let jmsfz = /(^\d{8}(0\d|10|11|12)([0-2]\d|30|31)\d{3}$)|(^\d{6}(18|19|20)\d{2}(0\d|10|11|12)([0-2]\d|30|31)\d{3}(\d|X|x)$)/;
        // if (!res.cardId) {
        if (!jmsfz.test(this.formData.cid)) {
          // uni.showToast({
          //   icon: "none",
          //   title: "身份证号码格式不正确",
          // });
          this.warming = true;
          return
        }else{
          this.warming = false;
        }
      }

      // 焦虑答卷
      const dataGad7List = problemList.filter((item) => {
        return item.pType === "3";
      });
      let arrGad7 = [];
      let zScoreGad7 = 0;
      let zResultGad7 = "无焦虑";
      dataGad7List.forEach((item) => {
        zScoreGad7 += item.num;
        arrGad7.push({
          name: item.order,
          value: item.num.toString(),
        });
      });
      arrGad7 = arrGad7.length ? JSON.stringify(arrGad7) : null;
      switch (true) {
        case dataGad7List.length == 0:
          zResultGad7 = "未评估";
          break;
        case zScoreGad7 <= 4 && zScoreGad7 != 0:
          zResultGad7 = "无焦虑";
          break;
        case zScoreGad7 <= 9 && zScoreGad7 >= 5:
          zResultGad7 = "轻度焦虑";
          break;
        case zScoreGad7 <= 14 && zScoreGad7 >= 10:
          zResultGad7 = "中度焦虑";
          break;
        case zScoreGad7 >= 15:
          zResultGad7 = "重度焦虑";
          break;
      }
      console.log("dataGad7List", arrGad7, zScoreGad7, zResultGad7);

      // 失眠答卷
      const dataIsiList = problemList.filter((item) => {
        return item.pType === "1";
      });
      let arrIsi = [];
      let zScoreIsi = 0;
      let zResultIsi = "没有临床上显著的失眠症";
      dataIsiList.forEach((item) => {
        zScoreIsi += item.num;
        arrIsi.push({
          name: item.order,
          value: item.num.toString(),
        });
      });
      arrIsi = arrIsi.length ? JSON.stringify(arrIsi) : null;
      switch (true) {
        case dataIsiList.length == 0:
          zResultIsi = "未评估";
          break;
        case zScoreIsi <= 7 && zScoreIsi != 0:
          zResultIsi = "没有临床上显著的失眠症";
          break;
        case zScoreIsi <= 14 && zScoreIsi >= 8:
          zResultIsi = "可能有阈下失眠症";
          break;
        case zScoreIsi <= 21 && zScoreIsi >= 15:
          zResultIsi = "可能有中度临床失眠症";
          break;
        case zScoreIsi >= 22:
          zResultIsi = "可能有重度临床失眠症";
          break;
      }
      console.log("dataIsiList", arrIsi, zScoreIsi, zResultIsi);

      // 心理健康答卷
      const dataPhq9List = problemList.filter((item) => {
        return item.pType === "2";
      });
      let arrPhq9 = [];
      let zScorePhq9 = 0;
      let zResultPhq9 = "无抑郁症";
      dataPhq9List.forEach((item) => {
        zScorePhq9 += item.num;
        arrPhq9.push({
          name: item.order,
          value: item.num.toString(),
        });
      });

      arrPhq9 = arrPhq9.length ? JSON.stringify(arrPhq9) : null;
      switch (true) {
        case dataPhq9List.length == 0:
          zResultPhq9 = "未评估";
          break;
        case zScorePhq9 <= 4 && zScorePhq9 != 0:
          zResultPhq9 = "无抑郁症";
          break;
        case zScorePhq9 <= 9 && zScorePhq9 >= 5:
          zResultPhq9 = "轻度抑郁症";
          break;
        case zScorePhq9 <= 14 && zScorePhq9 >= 10:
          zResultPhq9 = "可能有中度抑郁症";
          break;
        case zScorePhq9 <= 19 && zScorePhq9 >= 15:
          zResultPhq9 = "可能有中重度抑郁症";
          break;
        case zScorePhq9 >= 20:
          zResultPhq9 = "可能有重度抑郁症";
          break;
      }
      console.log("dataPhq9List", arrPhq9, zScorePhq9, zResultPhq9);
      console.log(uni.getStorageSync("personInfo").personId, 9999);
      let tmppersonInfo = uni.getStorageSync("personInfo");
      let params = {
        personId: uni.getStorageSync("personInfo").personId,
        dataGad7: arrGad7,
        dataIsi: arrIsi,
        dataPhq9: arrPhq9,
        resultGad7: zResultGad7,
        resultIsi: zResultIsi,
        resultPhq9: zResultPhq9,
        scoreGad7: dataGad7List.length ? zScoreGad7 : null,
        scoreIsi: dataIsiList.length ? zScoreIsi : null,
        scorePhq9: dataPhq9List.length ? zScorePhq9 : null,
        assessmentTime: this.getNowTime(),
        name: tmppersonInfo.name,
        gender: tmppersonInfo.gender,
        age: tmppersonInfo.age,
        hotelName: tmppersonInfo.hotelName,
        houseId: tmppersonInfo.houseId,
      };
      this.scoreGad7 = zScoreGad7;
      this.resultGad7 = zResultGad7;
      this.scoreIsi = zScoreIsi;
      this.resultIsi = zResultIsi;
      this.scorePhq9 = zScorePhq9;
      this.resultPhq9 = zResultPhq9;

      // 存用户基本信息
      this.setFormAata();
      
      if (this.reportType.isolateUser) {
        this.ajaxGeli(params);
      } else {
        this.ajaxQunzhong(params);
      }
    },

    // 隔离人员
    ajaxGeli(params) {
      console.log("====隔离人员提交======");
      console.log("提交入参====", params);
      let dataFromUserBaseInfo = uni.getStorageSync("dataFromUserBaseInfo");
      let _params = {
        ...dataFromUserBaseInfo,
        ...params
      }
      uni.showLoading({
        title: '加载中',
        mask:true
      });
      getData("comprehensive", "POST", _params).then((res) => {
        uni.hideLoading();
        try {
          uni.removeStorage({
            key: "dataGad7",
          });
          uni.removeStorage({
            key: "dataPhq9",
          });
          uni.removeStorage({
            key: "dataIsi",
          });
          this.dataIsiArr = [];
          this.dataPhq9Arr = [];
          this.dataGad7Arr = [];
          this.reportList.forEach(item=>{
            item.isComplete = null
          })
        } catch (error) {}
        uni.navigateTo({
          url: `../mentalHealth/success?scoreGad7=${this.scoreGad7}&scoreIsi=${this.scoreIsi}&scorePhq9=${this.scorePhq9}&resultGad7=${this.resultGad7}&resultIsi=${this.resultIsi}&resultPhq9=${this.resultPhq9}`,
        });
      });
    },

    // 群众调用
    ajaxQunzhong(params) {
      let dataFromUserBaseInfo = uni.getStorageSync("dataFromUserBaseInfo");

      let data = {
        ...params,
        ...dataFromUserBaseInfo,
      };

      console.log("========其他群众提交=======");
      console.log("提交入参====", data);

      uni.showLoading({
        title: '加载中',
        mask:true
      });
      // 换新接口
      getData("riskAss", "POST", data).then((res) => {
        uni.hideLoading();
        try {
          uni.removeStorage({
            key: "dataGad7",
          });
          uni.removeStorage({
            key: "dataPhq9",
          });
          uni.removeStorage({
            key: "dataIsi",
          });
          this.reportList.forEach(item=>{
            item.isComplete = null
          })
          this.dataIsiArr = [];
          this.dataPhq9Arr = [];
          this.dataGad7Arr = [];
        } catch (error) {}

        uni.navigateTo({
          url: `../mentalHealth/success?scoreGad7=${this.scoreGad7}&scoreIsi=${this.scoreIsi}&scorePhq9=${this.scorePhq9}&resultGad7=${this.resultGad7}&resultIsi=${this.resultIsi}&resultPhq9=${this.resultPhq9}`,
        });
      });
    },
  },
  onLoad(e) {
    let telPhone = uni.getStorageSync("telPhone");
    this.reportType = uni.getStorageSync("reportType");
    let reportType = this.reportType;

    // 获取上一个页面扫码获取数据
    this.formData = {...this.formData, ...uni.getStorageSync("dataFromUserBaseInfo")};

    // 是否扫一码通的入境人员
    this.fromAbroad = uni.getStorageSync("isFromAbroad");
    // this.isolateUser = e.isolateUser;

    console.log('是否入境人员：',this.fromAbroad);

    // this.userCheck(telPhone);
    // if(reportType.isolateUser)this.getPersonInfo(telPhone);
    this.getPersonInfo(telPhone);

    this.getRepRes();
  },
  onReady() {},
};
</script>

<style lang="scss" scoped>
.basic{
  // margin: 30rpx 0;
  padding: 0 32rpx;
  background: #fff;
  border-top: 1rpx solid rgba(44, 154, 241, 0.2);
  box-shadow: 0px 1px 10px rgba(229, 229, 229, 0.8);
  border-radius: 16rpx;
  .basic-title{
    border-bottom: 1rpx solid #e4e4e4;
    padding: 40rpx 0;
  }
  .form-item{
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 96rpx;
    line-height: 96rpx;
    .label{
      font-size: 30rpx;
      // color: rgba(102, 102, 102, 1);
      font-weight: 600;
    }
    .detail{
      text-align: right;
      font-size: 34rpx;
      line-height: 48rpx;
      color: rgba(0, 0, 0, 1);
    }
  }
}
.form-item-card{
  // height: 196rpx;
  height: 176rpx;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  .form-item-card-row{
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    .label{
      font-size: 30rpx;
      // color: rgba(102, 102, 102, 1);
      font-weight: 600;
    }
    .detail{
      text-align: right;
      font-size: 34rpx;
      line-height: 48rpx;
      color: rgba(0, 0, 0, 1);
    }
    .item-cid{
      width: 100%;;
      position: relative;
      margin-top: 16rpx;
      padding-bottom: 40rpx;
      .card-num{
        width: 80%;
        border: none !important;
      }
      .warming{
        position: absolute;
        left: 0;
        top: 70rpx;
        width: 100%;
        font-size: 26rpx;
        border-top: 1px solid rgba(102, 102, 102, 0.3);
      }
      .border-top{
        color: rgba(241, 91, 83, 1);
        border-top: 1px solid rgba(241, 91, 83, 1);
      }
    }
    .tips{
      font-size: 26rpx;
      color: rgba(241, 91, 83, 1);
      width: 100%;;
      padding-bottom: 10rpx;
    }

  }
}

/deep/ .basic .uni-data-checklist .checklist-group .checklist-box:nth-child(2){
  // background: red !important;
  margin-right: 0;
}

/deep/ .form-item-card .form-item-card-row .item-cid .card-num .uni-easyinput .uni-easyinput__content{
  border: none !important;
  input{
    padding-left: 0 !important;
    font-size: 34rpx;
    // border-bottom: 1px solid #ccc;
  }
}


.mar-t {
  margin-top: 40rpx;
}
.flex-box {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.flex-left {
  width: 160rpx;
  height: 56rpx;
  font-size: 40rpx;
  font-family: PingFang SC;
  font-weight: 600;
  line-height: rpx;
  color: #000000;
  opacity: 1;
}
.flex-right {
  width: 364rpx;
  height: 37rpx;
  font-size: 26rpx;
  font-family: PingFang SC;
  font-weight: 400;
  line-height: 37rpx;
  color: #ff6010;
  opacity: 1;
}
.left-sty {
  // margin: 0 30rpx;
  // height: 74rpx;
  border-bottom: 1rpx solid #e4e4e4;
  // margin-bottom: 40rpx;
  padding: 40rpx 0;
}
.content {
  width: 100%;
  padding: 32rpx;
  box-sizing: border-box;
  .swiper-outer {
    height: 290rpx;
  }
}
.person {
  &-popup {
    &-tip {
      color: #000000;
      text-align: left;
    }
    &-title {
      padding: 30rpx 0 20rpx;
      color: #333;
    }
  }
}
.modal {
  width: 90%;
  background-color: #fff;
  border-radius: 20rpx;
  padding: 40rpx;
  box-sizing: border-box;
  height: 30vh;
  margin: 30vh auto;
  &-title {
    text-align: center;
    padding: 40rpx;
  }
  .submit-btn {
    border: 1px solid #2c9af1;
    background-color: #fff;
    color: #2c9af1;
  }
}
.swiper-images {
  width: 100%;
  border-radius: 10rpx;
}
.normal-control {
  display: flex;
  padding-top: 40rpx;
  padding-bottom: 0;
  box-sizing: border-box;
  align-items: center;
  &-title {
    font-weight: 600;
    font-size: 40rpx;
    width: 35%;
    float: left;
  }
  &-con {
    width: 65%;
    float: right;
    &-picker {
      padding: 10rpx 20rpx;
      text-align: center;
      border: 1px solid #2c9af1;
      border-radius: 8rpx;
      .uni-input {
        width: 90%;
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
        font-size: 24rpx;
      }
    }
  }
}
.nav-list {
  // background: url(https://szgd-dev.tgovcloud.com/public/images/bg.png);
  // background-size: 100% 100%;
  // background-repeat: no-repeat;
  width: 100%;
  background: #fff;
  border-top: 1rpx solid rgba($color: #2c9af1, $alpha: 0.2);
  box-shadow: 0px 1px 10px rgba($color: #e5e5e5, $alpha: 0.8);
  // height: 300rpx;
  border-radius: 16rpx;
  margin-bottom: 32rpx;
  padding: 0 30rpx 0 40rpx;
  // padding-top: 40rpx;
  box-sizing: border-box;
  display: flex;
  flex-direction: column-reverse;
  &-item {
    box-sizing: border-box;
    display: flex;
    align-items: center;
    padding: 40rpx 0;
    border-bottom: 1rpx solid #e4e4e4;
    &-title {
      flex: 2;
      font-size: 36rpx;
    }
    &-img {
      margin-right: 20rpx;
      &-show {
        width: 110rpx;
        height: 110rpx;
      }
    }
    &-arr {
      flex: 1;
      margin-right: 20rpx;
      text-align: right;
      &-btn {
        width: 120rpx;
        color: #fff;
        border: 1px solid #2c9af1;
        background-color: #2c9af1;
        border-radius: 16rpx;
        padding: 10rpx 40rpx;
        font-size: 34rpx;
        text-align: center;
        &-second {
          background-color: #fff;
          color: #2c9af1;
        }
      }
      &-show {
        width: 24rpx;
      }
    }
    &-success {
      width: 20rpx;
      height: 20rpx;
      background-image: url();
      background-size: 100% 100%;
      background-repeat: no-repeat;
    }
  }
}
.self-report {
  font-size: 30rpx;
  margin-top: 40rpx;
  &-list-item {
    // height: 200rpx;
  }
  &-icon {
    width: 36rpx;
    height: 36rpx;
    background-size: 100%;
    display: inline-block;
    margin-right: 20rpx;
    margin-left: 20rpx;
    vertical-align: middle;
    background-image: url("");
    &-success {
      background-image: url("");
    }
  }
}
.start-btn {
  // background-color: #2c9af1;
  border-radius: 16rpx;
  // width: 50vw;
  height: 94rpx;
  // line-height: 94rpx;
  // width: 298rpx;
  width: 220rpx;
  box-sizing: border-box;
  padding: 20rpx;
  // color: #fff;
  text-align: center;
  margin: 40rpx auto;
  font-size: 34rpx;
}
.start-btn-left {
  border: 2px solid #2c9af1;
  color: #2c9af1;
}

.start-btn-right {
  background: #2c9af1;
  color: #fff;
}
.child-report {
  text-align: center;
  margin-top: 10vh;
  &-img {
    width: 200rpx;
  }
  &-text {
    font-size: 30rpx;
    color: #cccccc;
    margin-top: 5vh;
  }
}
.nav-list-item-success {
  width: 90rpx;
  height: 40rpx;
  font-size: 28rpx;
  background-size: 38rpx 38rpx;
  background-position: bottom left;
  padding-left: 45rpx;
  text-align: right;
  // font-weight: 400;
}
.uncomplate {
  background-image: url("https://szgd-dev.tgovcloud.com/public/images/mentalHealth/uncomplate.png");
}
.nl-txt {
  font-size: 26rpx;
  margin-left: 6rpx;
}
</style>
